<html><head>
<title>Search: {{q}}</title>
</head><body>
<form name="snippy" method="post" action="/admin/search/">
{{message}}
<input type="search" name="q" value="{{q}}" autofocus/>
<input type="submit"/><br/>

{% if results %}
<table>
<tr>
  <td><label><input onChange="allCheckboxes(this);"
 type="checkbox" name="all">ALL</label></td>
</tr>
{% for result in results %}
<tr>
  <td><label><input type="checkbox" name="kw" value="{{result.keyword}}" {{result.checked|yesno:"checked,"}}> <a href="/{{result.keyword}}">{{result.keyword}}</a></label></td>
  <td><i>{{result.private|yesno:"private,public"}}</i></td>
  <td><i>{{result.used_count}}</i></td>
 <td><a href="/admin/add/?keyword={{result.keyword}}">edit</a></td>
  <td>{{result.url|urlize}}</td>
{% if update_status %}
<td>{{result.update_status}}</td>
{% endif %}
</tr>
{% endfor %}
<tr>
  <td><label><input onChange="allCheckboxes(this);"
 type="checkbox" name="all">ALL</label></td>
</tr>
</table>
Private
<lablel><input type="radio" name="private" {{private_yes}} value="yes">Yes</label>
<lablel><input type="radio" name="private" {{private_no}} value="no">No</label>
<br/>
<input type="submit" name="update" value="update"/>
<input type="submit" name="delete" value="delete"
       onClick="return confirm('Really delete selected keywords');" />
{% endif %}
</form>


<script type="text/javascript">
function allCheckboxes(el) {
  var form = el.form;
  var checked = el.checked;
 for (var i = 0; i < form.elements.length; i++) {
   el = form.elements[i];

    if (el.type == 'checkbox'  && el.checked != checked) {
    el.checked = checked;
    }
  }
}
</script>
</body></html>
